<?php
define('LMO', true);
define('BS', '/');
define('ROOT', dirname(__FILE__).BS.'..');
define('APP', ROOT.BS.'app');
define('LIB', APP.BS.'library');
define('CONFIG', APP.BS.'config');
include (CONFIG.BS.'/init.php');

$account = LAccount::getInstance();
$list = LFile::getListFile(SERVER_STORAGE_PATH, SERVER_FILE_EXT);
$logFile = LOG_STORAGE_PATH.BS.'cronjob.log';

foreach($list as $ip) {
    $ip = str_replace('.conf', '', $ip);
    echo PHP_CMD.' -f '.ROOT.BS.'cronjob'.BS.'job.php '.$ip;
    echo "\r\n";
    exec(PHP_CMD.' -f '.ROOT.BS.'cronjob'.BS.'job.php '.$ip. '>> '.$logFile.' 2>&1 &');
}
?>